﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TargetObj : MonoBehaviour {
    public GameObject joyGo;

	// Use this for initialization
	void Start () {
        joyGo.GetComponent<Joy>().onJoyBegain.AddListener(onJoyBegain);
        joyGo.GetComponent<Joy>().onJoyMove.AddListener(onJoyMove);
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void onJoyBegain() {
    }
    void onJoyMove(Vector3 detlaPos){
        gameObject.transform.position += detlaPos;
    }
}
